package cn.com.yx.ms.domain.mq;

/**
 * MQ队列配置实体
 * Created by zhul on 2017/3/10.
 */
public enum MqCommandType {

    C1001("调试模式", 1001),
    C1002("设备检测", 1002),
    C1004("定时开关机", 1004),
    C1005("设备告警阀值下发", 1005),
    C1009("LED定时开关", 1009),
    C2002("公告下发", 2002),
    C2003("节目下发", 2003),
    C2004("节目下载状态", 2004),
    C2010("多媒体信息获取", 2010),
    C2011("公告信息获取", 2011),
    C2012("直播配置获取", 2012),
    C2100("网页包下载", 2100),
    C2101("网页包下载上报", 2101),
    C3001("状态上报", 3001),
    C3002("设备告警上报", 3002),
    C3003("心跳上报", 3003),
    C3004("异常日志接收", 3004),
    C3005("异常日志接收回复", 3005),
    C4002("系统重启", 4002),
    C4003("设备时间设置", 4003),
    C4005("TTS", 4005),
    C4006("继电器控制", 4006),
    C4007("远程升级", 4007),
    C4008("远程升级应答", 4008),
    C4009("截屏", 4009),
    C4010("子程序远程升级", 4010),
    C4011("板卡初始化配置", 4011),
    C5001("公交线路数据", 5001),
    C5002("公交线路拥挤数据", 5002),
    C5003("公交小车数据", 5003),
    C5011("公交静态线路获取", 5011);

    private String name;
    private int index;

    private MqCommandType(String name, int index) {
        this.name = name;
        this.index = index;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getIndex() {
        return index;
    }

    public void setIndex(int index) {
        this.index = index;
    }

    public static MqCommandType getEnumFromString(String string) {
        if (string != null) {
            try {
                return Enum.valueOf(MqCommandType.class, string.trim());
            } catch (IllegalArgumentException ex) {
            }
        }
        return null;
    }
}
